package com.link.base.base.apimiddle.service;

import com.link.base.base.apimiddle.model.ApiMiddle;
import com.link.base.base.interinfo.model.InterInfo;
import com.link.core.basic.service.BasicService;

import java.util.List;

/**
 * &comments& 
 *
 * @author zhangmin
 * @date 2019-07-03
 */
public interface ApiMiddleService extends BasicService<ApiMiddle> {

    /**
     * 将中间表中的数据同步插入到正式表
     * @author zhenghongda
     * @date 
     * @param 
     * @return 
     */ 
    public void processData(List<ApiMiddle> apiMiddleList) throws Exception;

    void dataAccess(Object data, InterInfo interInfo) throws Exception;

    List<ApiMiddle> queryByInterCode(List<String> list);

    void sendCateringData(ApiMiddle apiMiddle);

    /**
     * 根据module查询最新的一条成功的日志记录
     *
     * @author 安小波
     * @date 2019/12/16 10:14
     * @param apiMiddle
     */
    ApiMiddle queryLastRecordByModule(ApiMiddle apiMiddle) throws Exception;

    /**
     * 接口执行完成之后更新接口记录的状态、错误信息、结束时间
     *
     * @author 安小波
     * @date 2019/12/16 11:45
     * @param apiMiddle
     */
    void afterExecutedUpdate(ApiMiddle apiMiddle) throws Exception;
}
